home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / SCSL / scfft3d.z / scfft3d
Encoding:
Text File  |  2002-10-03  |  43.5 KB  |  857 lines

  1.  
  2.  
  3.  
  4. SSSSCCCCFFFFFFFFTTTT3333DDDD((((3333SSSS))))                                                        SSSSCCCCFFFFFFFFTTTT3333DDDD((((3333SSSS))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      SSSSCCCCFFFFFFFFTTTT3333DDDD, DDDDZZZZFFFFFFFFTTTT3333DDDD, CCCCSSSSFFFFFFFFTTTT3333DDDD, ZZZZDDDDFFFFFFFFTTTT3333DDDD - Applies a three-dimensional real-
  10.      to-complex Fast Fourier Transform (FFT)
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      Single precision -> Single precision complex
  14.  
  15.           Fortran:
  16.                CCCCAAAALLLLLLLL SSSSCCCCFFFFFFFFTTTT3333DDDD ((((_i_s_i_g_n,,,, _n_1,,,, _n_2,,,, _n_3,,,, _s_c_a_l_e,,,, _x,,,, _l_d_x,,,, _l_d_x_2,,,, _y,,,, _l_d_y,,,,
  17.                _l_d_y_2,,,, _t_a_b_l_e,,,, _w_o_r_k,,,, _i_s_y_s))))
  18.  
  19.           C/C++:
  20.                ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____fffffffftttt....hhhh>>>>
  21.                iiiinnnntttt ssssccccfffffffftttt3333dddd ((((iiiinnnntttt _i_s_i_g_n,,,, iiiinnnntttt _n_1,,,, iiiinnnntttt _n_2,,,, iiiinnnntttt _n_3,,,, ffffllllooooaaaatttt _s_c_a_l_e,,,,
  22.                ffffllllooooaaaatttt *_x,,,, iiiinnnntttt _l_d_x,,,, iiiinnnntttt _l_d_x_2,,,, ssssccccssssllll____ccccoooommmmpppplllleeeexxxx *_y,,,, iiiinnnntttt _l_d_y,,,, iiiinnnntttt
  23.                _l_d_y_2,,,, ffffllllooooaaaatttt *_t_a_b_l_e,,,, ffffllllooooaaaatttt *_w_o_r_k,,,, iiiinnnntttt *_i_s_y_s))));;;;
  24.  
  25.           C++ STL:
  26.                ####iiiinnnncccclllluuuuddddeeee <<<<ccccoooommmmpppplllleeeexxxx....hhhh>>>>
  27.                ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____fffffffftttt....hhhh>>>>
  28.                iiiinnnntttt ssssccccfffffffftttt3333dddd ((((iiiinnnntttt _i_s_i_g_n,,,, iiiinnnntttt _n_1,,,, iiiinnnntttt _n_2,,,, iiiinnnntttt _n_3,,,, ffffllllooooaaaatttt _s_c_a_l_e,,,,
  29.                ffffllllooooaaaatttt *_x,,,, iiiinnnntttt _l_d_x,,,, iiiinnnntttt _l_d_x_2,,,, ccccoooommmmpppplllleeeexxxx<<<<ffffllllooooaaaatttt>>>> *_y,,,, iiiinnnntttt _l_d_y,,,, iiiinnnntttt
  30.                _l_d_y_2,,,, ffffllllooooaaaatttt *_t_a_b_l_e,,,, ffffllllooooaaaatttt *_w_o_r_k,,,, iiiinnnntttt *_i_s_y_s))));;;;
  31.  
  32.      Double precision -> Double precision complex
  33.  
  34.           Fortran:
  35.                CCCCAAAALLLLLLLL DDDDZZZZFFFFFFFFTTTT3333DDDD ((((_i_s_i_g_n,,,, _n_1,,,, _n_2,,,, _n_3,,,, _s_c_a_l_e,,,, _x,,,, _l_d_x,,,, _l_d_x_2,,,, _y,,,, _l_d_y,,,,
  36.                _l_d_y_2,,,, _t_a_b_l_e,,,, _w_o_r_k,,,, _i_s_y_s))))
  37.  
  38.           C/C++:
  39.                ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____fffffffftttt....hhhh>>>>
  40.                iiiinnnntttt ddddzzzzfffffffftttt3333dddd ((((iiiinnnntttt _i_s_i_g_n,,,, iiiinnnntttt _n_1,,,, iiiinnnntttt _n_2,,,, iiiinnnntttt _n_3,,,, ddddoooouuuubbbblllleeee _s_c_a_l_e,,,,
  41.                ddddoooouuuubbbblllleeee *_x,,,, iiiinnnntttt _l_d_x,,,, iiiinnnntttt _l_d_x_2,,,, ssssccccssssllll____zzzzoooommmmpppplllleeeexxxx *_y,,,, iiiinnnntttt _l_d_y,,,, iiiinnnntttt
  42.                _l_d_y_2,,,, ddddoooouuuubbbblllleeee *_t_a_b_l_e,,,, ddddoooouuuubbbblllleeee *_w_o_r_k,,,, iiiinnnntttt *_i_s_y_s))));;;;
  43.  
  44.           C++ STL:
  45.                ####iiiinnnncccclllluuuuddddeeee <<<<ccccoooommmmpppplllleeeexxxx....hhhh>>>>
  46.                ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____fffffffftttt....hhhh>>>>
  47.                iiiinnnntttt ddddzzzzfffffffftttt3333dddd ((((iiiinnnntttt _i_s_i_g_n,,,, iiiinnnntttt _n_1,,,, iiiinnnntttt _n_2,,,, iiiinnnntttt _n_3,,,, ddddoooouuuubbbblllleeee _s_c_a_l_e,,,,
  48.                ddddoooouuuubbbblllleeee *_x,,,, iiiinnnntttt _l_d_x,,,, iiiinnnntttt _l_d_x_2,,,, ccccoooommmmpppplllleeeexxxx<<<<ddddoooouuuubbbblllleeee>>>> *_y,,,, iiiinnnntttt _l_d_y,,,, iiiinnnntttt
  49.                _l_d_y_2,,,, ddddoooouuuubbbblllleeee *_t_a_b_l_e,,,, ddddoooouuuubbbblllleeee *_w_o_r_k,,,, iiiinnnntttt *_i_s_y_s))));;;;
  50.  
  51.      Single precision complex -> Single precision
  52.  
  53.           Fortran:
  54.                CCCCAAAALLLLLLLL CCCCSSSSFFFFFFFFTTTT3333DDDD ((((_i_s_i_g_n,,,, _n_1,,,, _n_2,,,, _n_3,,,, _s_c_a_l_e,,,, _x,,,, _l_d_x,,,, _l_d_x_2,,,, _y,,,, _l_d_y,,,,
  55.                _l_d_y_2,,,, _t_a_b_l_e,,,, _w_o_r_k,,,, _i_s_y_s))))
  56.  
  57.           C/C++:
  58.                ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____fffffffftttt....hhhh>>>>
  59.                iiiinnnntttt ccccssssfffffffftttt3333dddd ((((iiiinnnntttt _i_s_i_g_n,,,, iiiinnnntttt _n_1,,,, iiiinnnntttt _n_2,,,, iiiinnnntttt _n_3,,,, ffffllllooooaaaatttt _s_c_a_l_e,,,,
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SSSSCCCCFFFFFFFFTTTT3333DDDD((((3333SSSS))))                                                        SSSSCCCCFFFFFFFFTTTT3333DDDD((((3333SSSS))))
  71.  
  72.  
  73.  
  74.                ssssccccssssllll____ccccoooommmmpppplllleeeexxxx *_x,,,, iiiinnnntttt _l_d_x,,,, iiiinnnntttt _l_d_x_2,,,, ffffllllooooaaaatttt *_y,,,, iiiinnnntttt _l_d_y,,,, iiiinnnntttt
  75.                _l_d_y_2,,,, ffffllllooooaaaatttt *_t_a_b_l_e,,,, ffffllllooooaaaatttt *_w_o_r_k,,,, iiiinnnntttt *_i_s_y_s))));;;;
  76.  
  77.           C++ STL:
  78.                ####iiiinnnncccclllluuuuddddeeee <<<<ccccoooommmmpppplllleeeexxxx....hhhh>>>>
  79.                ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____fffffffftttt....hhhh>>>>
  80.                iiiinnnntttt ccccssssfffffffftttt3333dddd ((((iiiinnnntttt _i_s_i_g_n,,,, iiiinnnntttt _n_1,,,, iiiinnnntttt _n_2,,,, iiiinnnntttt _n_3,,,, ffffllllooooaaaatttt _s_c_a_l_e,,,,
  81.                ccccoooommmmpppplllleeeexxxx<<<<ffffllllooooaaaatttt>>>> *_x,,,, iiiinnnntttt _l_d_x,,,, iiiinnnntttt _l_d_x_2,,,, ffffllllooooaaaatttt *_y,,,, iiiinnnntttt _l_d_y,,,, iiiinnnntttt
  82.                _l_d_y_2,,,, ffffllllooooaaaatttt *_t_a_b_l_e,,,, ffffllllooooaaaatttt *_w_o_r_k,,,, iiiinnnntttt *_i_s_y_s))));;;;
  83.  
  84.      Double precision complex -> Double precision
  85.  
  86.           Fortran:
  87.                CCCCAAAALLLLLLLL ZZZZDDDDFFFFFFFFTTTT3333DDDD ((((_i_s_i_g_n,,,, _n_1,,,, _n_2,,,, _n_3,,,, _s_c_a_l_e,,,, _x,,,, _l_d_x,,,, _l_d_x_2,,,, _y,,,, _l_d_y,,,,
  88.                _l_d_y_2,,,, _t_a_b_l_e,,,, _w_o_r_k,,,, _i_s_y_s))))
  89.  
  90.           C/C++:
  91.                ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____fffffffftttt....hhhh>>>>
  92.                iiiinnnntttt zzzzddddfffffffftttt3333dddd ((((iiiinnnntttt _i_s_i_g_n,,,, iiiinnnntttt _n_1,,,, iiiinnnntttt _n_2,,,, iiiinnnntttt _n_3,,,, ddddoooouuuubbbblllleeee _s_c_a_l_e,,,,
  93.                ssssccccssssllll____zzzzoooommmmpppplllleeeexxxx *_x,,,, iiiinnnntttt _l_d_x,,,, iiiinnnntttt _l_d_x_2,,,, ddddoooouuuubbbblllleeee *_y,,,, iiiinnnntttt _l_d_y,,,, iiiinnnntttt
  94.                _l_d_y_2,,,, ddddoooouuuubbbblllleeee *_t_a_b_l_e,,,, ddddoooouuuubbbblllleeee *_w_o_r_k,,,, iiiinnnntttt *_i_s_y_s))));;;;
  95.  
  96.           C++ STL:
  97.                ####iiiinnnncccclllluuuuddddeeee <<<<ccccoooommmmpppplllleeeexxxx....hhhh>>>>
  98.                ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____fffffffftttt....hhhh>>>>
  99.                iiiinnnntttt zzzzzzzzfffffffftttt3333dddd ((((iiiinnnntttt _i_s_i_g_n,,,, iiiinnnntttt _n_1,,,, iiiinnnntttt _n_2,,,, iiiinnnntttt _n_3,,,, ddddoooouuuubbbblllleeee _s_c_a_l_e,,,,
  100.                ccccoooommmmpppplllleeeexxxx<<<<ddddoooouuuubbbblllleeee>>>> *_x,,,, iiiinnnntttt _l_d_x,,,, iiiinnnntttt _l_d_x_2,,,, ddddoooouuuubbbblllleeee *_y,,,, iiiinnnntttt _l_d_y,,,, iiiinnnntttt
  101.                _l_d_y_2,,,, ddddoooouuuubbbblllleeee *_t_a_b_l_e,,,, ddddoooouuuubbbblllleeee *_w_o_r_k,,,, iiiinnnntttt *_i_s_y_s))));;;;
  102.  
  103. IIIIMMMMPPPPLLLLEEEEMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
  104.      These routines are part of the SCSL Scientific Library and can be loaded
  105.      using either the ----llllssssccccssss or the ----llllssssccccssss____mmmmpppp option.  The ----llllssssccccssss____mmmmpppp option
  106.      directs the linker to use the multi-processor version of the library.
  107.  
  108.      When linking to SCSL with ----llllssssccccssss or ----llllssssccccssss____mmmmpppp, the default integer size is
  109.      4 bytes (32 bits). Another version of SCSL is available in which integers
  110.      are 8 bytes (64 bits).  This version allows the user access to larger
  111.      memory sizes and helps when porting legacy Cray codes.  It can be loaded
  112.      by using the ----llllssssccccssss____iiii8888 option or the ----llllssssccccssss____iiii8888____mmmmpppp option. A program may use
  113.      only one of the two versions; 4-byte integer and 8-byte integer library
  114.      calls cannot be mixed.
  115.  
  116.      The C and C++ prototypes shown above are appropriate for the 4-byte
  117.      integer version of SCSL. When using the 8-byte integer version, the
  118.      variables of type iiiinnnntttt become lllloooonnnngggg lllloooonnnngggg and the <<<<ssssccccssssllll____fffffffftttt____iiii8888....hhhh>>>> header
  119.      file should be included.
  120.  
  121. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  122.      SSSSCCCCFFFFFFFFTTTT3333DDDD/DDDDZZZZFFFFFFFFTTTT3333DDDD computes the three-dimensional Fast Fourier Transform
  123.      (FFT) of the real matrix _X, and it stores the results in the complex
  124.      matrix _Y.  CCCCSSSSFFFFFFFFTTTT3333DDDD/ZZZZDDDDFFFFFFFFTTTT3333DDDD computes the corresponding inverse transform.
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. SSSSCCCCFFFFFFFFTTTT3333DDDD((((3333SSSS))))                                                        SSSSCCCCFFFFFFFFTTTT3333DDDD((((3333SSSS))))
  137.  
  138.  
  139.  
  140.      In FFT applications, it is customary to use zero-based subscripts; the
  141.      formulas are simpler that way.  First, the function of SSSSCCCCFFFFFFFFTTTT3333DDDD is
  142.      described.  Suppose the arrays are declared as follows:
  143.  
  144.           Fortran:
  145.  
  146.                REAL    X(0:ldx-1, 0:ldx2-1, 0:n3-1)
  147.                COMPLEX Y(0:ldy-1, 0:ldy2-1, 0:n3-1)
  148.  
  149.  
  150.           C/C++:
  151.  
  152.                float        x[n3][ldx2][ldx];
  153.                scsl_complex y[n3][ldy2][ldy];
  154.  
  155.  
  156.           C++ STL:
  157.  
  158.                float          x[n3][ldx2][ldx];
  159.                complex<float> y[n3][ldy2][ldy];
  160.  
  161.  
  162.      SSSSCCCCFFFFFFFFTTTT3333DDDD computes the formula:
  163.  
  164.      Y(k1,k2,k3) =
  165.              n1-1  n2-1  n3-1
  166.      scale * Sum   Sum   Sum [X(j1,j2,j3)*w1**(j1*k1)*w2**(j2*k2)*w3**(j3*k3)]
  167.             j1=0   j2=0  j3=0
  168.  
  169.      for _k_1 = 0, ..., _n_1/2,
  170.          _k_2 = 0, ..., _n_2 - 1,
  171.          _k_3 = 0, ..., _n_3 - 1,
  172.  
  173.  
  174.      where:
  175.  
  176.      _w_1        = exp(_i_s_i_g_n*2*_p_i*_i/_n_1),
  177.  
  178.      _w_2        = exp(_i_s_i_g_n*2*_p_i*_i/_n_2),
  179.  
  180.      _w_3        = exp(_i_s_i_g_n*2*_p_i*_i/_n_3),
  181.  
  182.      _i         = + sqrt(-1)
  183.  
  184.      _p_i        = 3.14159...
  185.  
  186.      _i_s_i_g_n     = +1 or -1
  187.  
  188.      Different authors use different conventions for which of the transforms,
  189.      _i_s_i_g_n = +1 or _i_s_i_g_n = -1, is the forward or inverse transform, and what
  190.      the _s_c_a_l_e factor should be in either case.  You can make these routines
  191.      compute any of the various possible definitions, however, by choosing the
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. SSSSCCCCFFFFFFFFTTTT3333DDDD((((3333SSSS))))                                                        SSSSCCCCFFFFFFFFTTTT3333DDDD((((3333SSSS))))
  203.  
  204.  
  205.  
  206.      appropriate values for _i_s_i_g_n and _s_c_a_l_e.
  207.  
  208.      The relevant fact from FFT theory is this:  If you take the FFT with any
  209.      particular values of _i_s_i_g_n and _s_c_a_l_e, the mathematical inverse function
  210.      is computed by taking the FFT with -_i_s_i_g_n and 1/(_n_1 * _n_2 * _n_3 * _s_c_a_l_e).
  211.      In particular, if you use _i_s_i_g_n = +1 and _s_c_a_l_e = 1.0 for the forward FFT,
  212.      you can compute the inverse FFT by _i_s_i_g_n = -1 and
  213.  
  214.           _s_c_a_l_e = 1.0/(_n_1*_n_2*_n_3).
  215.  
  216.      SSSSCCCCFFFFFFFFTTTT3333DDDD is very similar in function to CCCCCCCCFFFFFFFFTTTT3333DDDD(3S), but it takes the
  217.      real-to-complex transform in the first dimension, followed by the
  218.      complex-to-complex transform in the second and third dimensions.
  219.  
  220.      CCCCSSSSFFFFFFFFTTTT3333DDDD does the reverse.  It takes the complex-to-complex FFT in the
  221.      third and second dimensions, followed by the complex-to-real FFT in the
  222.      first dimension.
  223.  
  224.      See the IIIINNNNTTTTRRRROOOO____FFFFFFFFTTTT(3S) man page for more information about real-to-complex
  225.      and complex-to-real FFTs.  The three dimensional analog of the conjugate
  226.      formula is as follows:
  227.  
  228.           _Y_k_1,_k_2,_k_3 = conjg _Y _n_1 - _k_1, _n_2 - _k_2, _n_3 - _k_3
  229.  
  230.  
  231.           for  _n_1/2 <  _k_1 <= _n_1 - 1
  232.  
  233.  
  234.                0 <= _k_2 <= _n_2 - 1
  235.  
  236.  
  237.                0 <= _k_3 <= _n_3 - 1
  238.  
  239.      where the notation conjg(_z) represents the complex conjugate of _z.
  240.  
  241.      Thus, you have to compute only (slightly more than) half out the output
  242.      values, namely:
  243.  
  244.           _Y_k_1,_k_2,_k_3
  245.  
  246.  
  247.           for  0 <= _k_1 <= _n_1/2
  248.  
  249.  
  250.                0 <= _k_2 <= _n_2 - 1
  251.  
  252.  
  253.                0 <= _k_3 <= _n_3 - 1
  254.  
  255.  
  256.  
  257.  
  258.  
  259.                                                                         PPPPaaaaggggeeee 4444
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266. SSSSCCCCFFFFFFFFTTTT3333DDDD((((3333SSSS))))                                                        SSSSCCCCFFFFFFFFTTTT3333DDDD((((3333SSSS))))
  267.  
  268.  
  269.  
  270.      See the NOTES section of this man page for information about the
  271.      interpretation of the data types described in the following arguments.
  272.  
  273.      These routines have the following arguments:
  274.  
  275.      _i_s_i_g_n     Integer.  (input)
  276.                Specifies whether to initialize the _t_a_b_l_e array or to do the
  277.                forward or inverse Fourier transform, as follows:
  278.  
  279.                If _i_s_i_g_n = 0, the routine initializes the _t_a_b_l_e array and
  280.                returns.  In this case, the only arguments used or checked are
  281.                _i_s_i_g_n, _n_1, _n_2, _n_3, and _t_a_b_l_e.
  282.  
  283.                If _i_s_i_g_n = +1 or -1, the value of _i_s_i_g_n is the sign of the
  284.                exponent used in the FFT formula.
  285.  
  286.      _n_1        Integer.  (input)
  287.                Transform size in the first dimension.  If _n_1 is not positive,
  288.                the routine returns without computing a transform.
  289.  
  290.      _n_2        Integer.  (input)
  291.                Transform size in the second dimension.  If _n_2 is not positive,
  292.                the routine returns without computing a transform.
  293.  
  294.      _n_3        Integer.  (input)
  295.                Transform size in the third dimension.  If _n_3 is not positive,
  296.                the routine returns without computing a transform.
  297.  
  298.      _s_c_a_l_e     Scale factor.  (input)
  299.                SSSSCCCCFFFFFFFFTTTT3333DDDD: Single precision.
  300.                DDDDZZZZFFFFFFFFTTTT3333DDDD: Double precision.
  301.                CCCCSSSSFFFFFFFFTTTT3333DDDD: Single precision.
  302.                ZZZZDDDDFFFFFFFFTTTT3333DDDD: Double precision.
  303.                Each element of the output array is multiplied by _s_c_a_l_e after
  304.                taking the Fourier transform, as defined previously.
  305.  
  306.      _x         Array of dimensions (_l_d_x, _l_d_x_2, _n_3).  (input)
  307.                SSSSCCCCFFFFFFFFTTTT3333DDDD: Single precision array.
  308.                DDDDZZZZFFFFFFFFTTTT3333DDDD: Double precision array.
  309.                CCCCSSSSFFFFFFFFTTTT3333DDDD: Single precision complex array.
  310.                ZZZZDDDDFFFFFFFFTTTT3333DDDD: Double precision complex array.
  311.  
  312.                Array of values to be transformed.
  313.  
  314.      _l_d_x       Integer.  (input)
  315.                The first dimension of _x, as it was declared in the calling
  316.                program (the leading dimension of _x).
  317.  
  318.                SSSSCCCCFFFFFFFFTTTT3333DDDD, DDDDZZZZFFFFFFFFTTTT3333DDDD:  _l_d_x >= MMMMAAAAXXXX(_n_1, 1).
  319.                CCCCSSSSFFFFFFFFTTTT3333DDDD, ZZZZDDDDFFFFFFFFTTTT3333DDDD:  _l_d_x >= MMMMAAAAXXXX(_n_1/2 + 1, 1).
  320.  
  321.  
  322.  
  323.  
  324.  
  325.                                                                         PPPPaaaaggggeeee 5555
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332. SSSSCCCCFFFFFFFFTTTT3333DDDD((((3333SSSS))))                                                        SSSSCCCCFFFFFFFFTTTT3333DDDD((((3333SSSS))))
  333.  
  334.  
  335.  
  336.      _l_d_x_2      Integer.  (input)
  337.                The second dimension of _x, as it was declared in the calling
  338.                program.  _l_d_x_2 >= MMMMAAAAXXXX(_n_2, 1).
  339.  
  340.      _y         Array of dimensions (_l_d_y, _l_d_y_2, _n_3).  (output)
  341.                SSSSCCCCFFFFFFFFTTTT3333DDDD: Single precision complex array.
  342.                DDDDZZZZFFFFFFFFTTTT3333DDDD: Double precision complex array.
  343.                CCCCSSSSFFFFFFFFTTTT3333DDDD: Single precision array.
  344.                ZZZZDDDDFFFFFFFFTTTT3333DDDD: Double precision array.
  345.  
  346.                Output array of transformed values.  The output array can be
  347.                the same as the input array, in which case, the transform is
  348.                done in place; that is, the input array is overwritten with the
  349.                transformed values.  In this case, it is necessary that the
  350.                following equalities hold:
  351.  
  352.                SSSSCCCCFFFFFFFFTTTT3333DDDD, DDDDZZZZFFFFFFFFTTTT3333DDDD: _l_d_x = 2 * _l_d_y, and _l_d_x_2 = _l_d_y_2.
  353.                CCCCSSSSFFFFFFFFTTTT3333DDDD, ZZZZDDDDFFFFFFFFTTTT3333DDDD: _l_d_y = 2 * _l_d_x, and _l_d_x_2 = _l_d_y_2.
  354.  
  355.      _l_d_y       Integer.  (input)
  356.                The first dimension of _y, as it was declared in the calling
  357.                program; that is, the leading dimension of _y.
  358.  
  359.                SSSSCCCCFFFFFFFFTTTT3333DDDD, DDDDZZZZFFFFFFFFTTTT3333DDDD:  _l_d_y >= MMMMAAAAXXXX(_n_1/2 + 1, 1).
  360.                CCCCSSSSFFFFFFFFTTTT3333DDDD, ZZZZDDDDFFFFFFFFTTTT3333DDDD:  _l_d_y >= MMMMAAAAXXXX(_n_1 + 2, 1).
  361.  
  362.                In the complex-to-real routine, two extra elements are in the
  363.                first dimension (that is, _l_d_y >= _n_1 + 2, rather than just _l_d_y
  364.                >= _n_1).  These elements are needed for intermediate storage
  365.                during the computation.  On exit, their value is undefined.
  366.  
  367.      _l_d_y_2      Integer.  (input)
  368.                The second dimension of _y, as it was declared in the calling
  369.                program.  _l_d_y_2 >= MMMMAAAAXXXX(_n_2, 1).
  370.  
  371.      _t_a_b_l_e     Array of dimension (_n_1 + _N_F_R) + (2 * _n_2 + _N_F) + (2 * _n_3 + _N_F)
  372.                (input or output)
  373.                SSSSCCCCFFFFFFFFTTTT3333DDDD, CCCCSSSSFFFFFFFFTTTT3333DDDD: Single precision array.
  374.                DDDDZZZZFFFFFFFFTTTT3333DDDD, ZZZZDDDDFFFFFFFFTTTT3333DDDD: Double precision array.
  375.  
  376.                Table of factors and roots of unity.  See the description of
  377.                the _i_s_y_s argument for the value of _N_F and _N_F_R.
  378.  
  379.                If _i_s_i_g_n = 0, the routine initializes _t_a_b_l_e (_t_a_b_l_e is output
  380.                only).
  381.  
  382.                If _i_s_i_g_n = +1 or -1, the values in _t_a_b_l_e are assumed to be
  383.                initialized already by a prior call with _i_s_i_g_n = 0 *_t_a_b_l_e is
  384.                input only).
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.                                                                         PPPPaaaaggggeeee 6666
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398. SSSSCCCCFFFFFFFFTTTT3333DDDD((((3333SSSS))))                                                        SSSSCCCCFFFFFFFFTTTT3333DDDD((((3333SSSS))))
  399.  
  400.  
  401.  
  402.      _w_o_r_k      Array of dimension _n_1 + 4 * n3
  403.                SSSSCCCCFFFFFFFFTTTT3333DDDD, CCCCSSSSFFFFFFFFTTTT3333DDDD: Single precision array.
  404.                DDDDZZZZFFFFFFFFTTTT3333DDDD, ZZZZDDDDFFFFFFFFTTTT3333DDDD: Double precision array.
  405.  
  406.                Work array.  This is a scratch array used for intermediate
  407.                calculations.  Its address space must be different from that of
  408.                the input and output arrays.
  409.  
  410.      _i_s_y_s      Integer array dimensioned 0000........_i_s_y_s((((0000)))).
  411.                An array that gives implementation-specific information.  All
  412.                features and functions of the FFT routines specific to any
  413.                particular implementation are confined to this _i_s_y_s array.
  414.  
  415.                In the Origin series implementation, _i_s_y_s((((0000))))====0000 and _i_s_y_s((((0000))))====1111
  416.                are supported.  In SCSL versions prior to 1.3, only _i_s_y_s((((0000))))====0000
  417.                was allowed. For _i_s_y_s((((0000))))====0000, _N_F====33330000 and _N_F_R====11115555, and for
  418.                _i_s_y_s((((0000))))====1111, _N_F====_N_F_R====222255556666. The _N_F(_R) words of storage in the _t_a_b_l_e
  419.                array contain a factorization of the length of the transform.
  420.  
  421.                The smaller values of _N_F and _N_F_R for _i_s_y_s((((0000))))====0000 are historical.
  422.                They are too small to store all the required factors for the
  423.                highest performing FFT, so when _i_s_y_s((((0000))))====0000, extra space is
  424.                allocated when the _t_a_b_l_e array is initialized. To avoid memory
  425.                leaks, this extra space must be deallocated when the _t_a_b_l_e
  426.                array is no longer needed. The SSSSCCCCFFFFFFFFTTTT3333DDDDFFFF routine is used to
  427.                release this memory. Due to the potential for memory leaks, the
  428.                use of _i_s_y_s((((0000))))====0000 should be avoided.
  429.  
  430.                For _i_s_y_s((((0000))))====1111, the value of _N_F and _N_F_R are large enough so that
  431.                no extra memory needs to be allocated, and there is no need to
  432.                call SSSSCCCCFFFFFFFFTTTT3333DDDDFFFF to release memory. If called, it does nothing.
  433.  
  434.                NOTE: _i_s_y_s((((0000))))====1111 means that _i_s_y_s is an integer array with two
  435.                elements. The second element, _i_s_y_s((((1111)))), will not be accessed.
  436.  
  437. NNNNOOOOTTTTEEEESSSS
  438.      The following data types are described in this documentation:
  439.  
  440.           TTTTeeeerrrrmmmm UUUUsssseeeedddd                     DDDDaaaattttaaaa ttttyyyyppppeeee
  441.  
  442.      Fortran:
  443.  
  444.           Array dimensioned 0000........_n----1111      xxxx((((0000::::nnnn----1111))))
  445.  
  446.           Array of dimensions (_m,_n)     xxxx((((mmmm,,,,nnnn))))
  447.  
  448.           Array of dimensions (_m,_n,_p)   xxxx((((mmmm,,,,nnnn,,,,pppp))))
  449.  
  450.           Integer                       IIIINNNNTTTTEEEEGGGGEEEERRRR (IIIINNNNTTTTEEEEGGGGEEEERRRR****8888 for ----llllssssccccssss____iiii8888[[[[____mmmmpppp]]]])
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.                                                                         PPPPaaaaggggeeee 7777
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464. SSSSCCCCFFFFFFFFTTTT3333DDDD((((3333SSSS))))                                                        SSSSCCCCFFFFFFFFTTTT3333DDDD((((3333SSSS))))
  465.  
  466.  
  467.  
  468.           Single precision              RRRREEEEAAAALLLL
  469.  
  470.           Double precision              DDDDOOOOUUUUBBBBLLLLEEEE PPPPRRRREEEECCCCIIIISSSSIIIIOOOONNNN
  471.  
  472.           Single precision complex      CCCCOOOOMMMMPPPPLLLLEEEEXXXX
  473.  
  474.           Double precision complex      DDDDOOOOUUUUBBBBLLLLEEEE CCCCOOOOMMMMPPPPLLLLEEEEXXXX
  475.  
  476.      C/C++:
  477.  
  478.           Array dimensioned 0000........_n----1111      xxxx[[[[_n]]]]
  479.  
  480.           Array of dimensions (_m,_n)     xxxx[[[[mmmm****nnnn]]]] oooorrrr xxxx[[[[nnnn]]]][[[[mmmm]]]]
  481.  
  482.           Array of dimensions (_m,_n,_p)   xxxx[[[[mmmm****nnnn****pppp]]]] oooorrrr xxxx[[[[pppp]]]][[[[nnnn]]]][[[[mmmm]]]]
  483.  
  484.           Integer                       iiiinnnntttt (lllloooonnnngggg lllloooonnnngggg for ----llllssssccccssss____iiii8888[[[[____mmmmpppp]]]])
  485.  
  486.           Single precision              ffffllllooooaaaatttt
  487.  
  488.           Double precision              ddddoooouuuubbbblllleeee
  489.  
  490.           Single precision complex      ssssccccssssllll____ccccoooommmmpppplllleeeexxxx
  491.  
  492.           Double precision complex      ssssccccssssllll____zzzzoooommmmpppplllleeeexxxx
  493.  
  494.      C++ STL:
  495.  
  496.           Array dimensioned 0000........_n----1111      xxxx[[[[_n]]]]
  497.  
  498.           Array of dimensions (_m,_n)     xxxx[[[[mmmm****nnnn]]]] oooorrrr xxxx[[[[nnnn]]]][[[[mmmm]]]]
  499.  
  500.           Array of dimensions (_m,_n,_p)   xxxx[[[[mmmm****nnnn****pppp]]]] oooorrrr xxxx[[[[pppp]]]][[[[nnnn]]]][[[[mmmm]]]]
  501.  
  502.           Integer                       iiiinnnntttt (lllloooonnnngggg lllloooonnnngggg for ----llllssssccccssss____iiii8888[[[[____mmmmpppp]]]])
  503.  
  504.           Single precision              ffffllllooooaaaatttt
  505.  
  506.           Double precision              ddddoooouuuubbbblllleeee
  507.  
  508.           Single precision complex      ccccoooommmmpppplllleeeexxxx<<<<ffffllllooooaaaatttt>>>>
  509.  
  510.           Double precision complex      ccccoooommmmpppplllleeeexxxx<<<<ddddoooouuuubbbblllleeee>>>>
  511.  
  512. CCCCAAAAUUUUTTTTIIIIOOOONNNNSSSS
  513.      Transform sizes with a prime factor exceeding 22223332222----1111 are not supported for
  514.      the 8-byte integer version of the library.
  515.  
  516.      In addition to the _w_o_r_k array, the FFT routines also dynamically allocate
  517.      scratch space from the stack. The amount of space allocated can be
  518.      slightly bigger than the size of the largest processor cache. For single
  519.      processor runs, the default stack size is large enough that these
  520.  
  521.  
  522.  
  523.                                                                         PPPPaaaaggggeeee 8888
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530. SSSSCCCCFFFFFFFFTTTT3333DDDD((((3333SSSS))))                                                        SSSSCCCCFFFFFFFFTTTT3333DDDD((((3333SSSS))))
  531.  
  532.  
  533.  
  534.      allocations generally cause no problems. But for parallel runs, you need
  535.      to ensure that the stack size of slave threads is big enough to hold this
  536.      scratch space. Failure to reserve sufficient stack space will cause
  537.      programs to dump core due to stack overflows.  The stack size of MP
  538.      library slave threads is controlled via the MMMMPPPP____SSSSLLLLAAAAVVVVEEEE____SSSSTTTTAAAACCCCKKKKSSSSIIIIZZZZEEEE
  539.      environment variable or the mmmmpppp____sssseeeetttt____ssssllllaaaavvvveeee____ssssttttaaaacccckkkkssssiiiizzzzeeee(((()))) library routine. See
  540.      the mmmmpppp(3C), mmmmpppp(3F) and ppppeeee____eeeennnnvvvviiiirrrroooonnnn(5) reference pages for more information
  541.      on controlling the slave stack size. For pthreads applications, the
  542.      thread's stack size is specified as one of many creation attributes
  543.      provided in the pthread_attr_t argument to pppptttthhhhrrrreeeeaaaadddd____ccccrrrreeeeaaaatttteeee(3P).  The
  544.      stacksize attribute should be set explicitly to a non-default value using
  545.      the pppptttthhhhrrrreeeeaaaadddd____aaaattttttttrrrr____sssseeeettttssssttttaaaacccckkkkssssiiiizzzzeeee(3P) call, described in the
  546.      pppptttthhhhrrrreeeeaaaadddd____aaaattttttttrrrr____iiiinnnniiiitttt(3P) man page.
  547.  
  548.      Care must be exercised if copies of the _t_a_b_l_e array are used: even though
  549.      a copy exists, the original must persist. As an example, the following
  550.      code will nnnnooootttt work:
  551.  
  552.      #include <scsl_fft.h>
  553.      float x[129][129][129];
  554.      scsl_complex y[129][129][65];
  555.      float table[(128 + 256) + (2*128 + 256) + (2*128 + 256)];
  556.      float work[128 + 4*128];
  557.      int isys[2];
  558.      isys[0] = 1;
  559.      {
  560.        float table[(128 + 256) + (2*128 + 256) + (2*128 + 256)];
  561.  
  562.        scfft3d(0, 128, 128, 128, 1.0f, (float *) x, 129, 129,
  563.                (scsl_complex *) y, 65, 129, table_orig, work, isys);
  564.        bcopy(table_orig, table,
  565.               ((128+256)+(2*128+256)+(2*128+256))*sizeof(float));
  566.      }
  567.  
  568.      scfft3d(1, 128, 128, 128, 1.0f, (float *) x, 129, 129,
  569.              (scsl_complex *) y, 65, 129, table, work, isys);
  570.  
  571.  
  572.      In this example, because _t_a_b_l_e__o_r_i_g is a stack variable that does not
  573.      persist outside of the code block delimited by the braces, the data in
  574.      the copy, _t_a_b_l_e, are not guaranteed to be valid. However, the following
  575.      code will work because _t_a_b_l_e__o_r_i_g is persistent:
  576.  
  577.      #include <scsl_fft.h>
  578.      float x[129][129][129];
  579.      scsl_complex y[129][129][65];
  580.      float table_orig[(128 + 256) + (2*128 + 256) + (2*128 + 256)];
  581.      float table[(128 + 256) + (2*128 + 256) + (2*128 + 256)];
  582.      float work[128 + 4*128];
  583.      int isys[2];
  584.      isys[0] = 1;
  585.      scfft3d(0, 128, 128, 128, 1.0f, (float *) x, 129, 129,
  586.  
  587.  
  588.  
  589.                                                                         PPPPaaaaggggeeee 9999
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596. SSSSCCCCFFFFFFFFTTTT3333DDDD((((3333SSSS))))                                                        SSSSCCCCFFFFFFFFTTTT3333DDDD((((3333SSSS))))
  597.  
  598.  
  599.  
  600.              (scsl_complex *) y, 65, 129, table_orig, work, isys);
  601.      bcopy(table_orig, table,
  602.           ((128+256)+(2*128+256)+(2*128+256))*sizeof(float));
  603.      scfft3d(1, 128, 128, 128, 1.0f, (float *) x, 129, 129,
  604.              (scsl_complex *) y, 65, 129, table, work, isys);
  605.  
  606.  
  607. EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  608.      The following examples are for Origin series only.
  609.  
  610.      Example 1:  Initialize the TTTTAAAABBBBLLLLEEEE array in preparation for doing a three-
  611.      dimensional FFT of size 128 by 128 by 128.  In this case only the _i_s_i_g_n,
  612.      _n_1, _n_2, _n_3, and _t_a_b_l_e arguments are used; you can use dummy arguments or
  613.      zeros for other arguments.
  614.  
  615.      Fortran:
  616.  
  617.       REAL TABLE ((128 + 256) + (2*128 + 256) + (2*128 + 256))
  618.       INTEGER ISYS(0:1)
  619.       ISYS(0) = 1
  620.       CALL SCFFT3D (0, 128, 128, 128, 0.0, DUMMY, 1, 1, DUMMY, 1, 1,
  621.      &              TABLE, DUMMY, ISYS)
  622.  
  623.  
  624.      C/C++:
  625.  
  626.           #include <scsl_fft.h>
  627.           float table[(128 + 256) + (2*128 + 256) + (2*128 + 256)];
  628.           int isys[2];
  629.           isys[0] = 1;
  630.           scfft3d(0, 128, 128, 128, 0.0f, NULL, 1, 1, NULL, 1, 1,
  631.                   table, NULL, isys);
  632.  
  633.  
  634.      C++ STL:
  635.  
  636.           #include <complex.h>
  637.           #include <scsl_fft.h>
  638.           float table[(128 + 256) + (2*128 + 256) + (2*128 + 256)];
  639.           int isys[2];
  640.           isys[0] = 1;
  641.           scfft3d(0, 128, 128, 128, 0.0f, NULL, 1, 1, NULL, 1, 1,
  642.                  table, NULL, isys);
  643.  
  644.  
  645.      Example 2:  XXXX is a real array of dimensioned (0...128, 0...128, 0...128).
  646.      The first 128 elements of each dimension contain data; for performance
  647.      reasons, the extra element forces the leading dimensions to be odd
  648.      numbers.  YYYY is a complex array of dimension (0...64, 0...128, 0...128).
  649.      Take the three-dimensional FFT of XXXX and store it in YYYY.  Initialize the
  650.      TTTTAAAABBBBLLLLEEEE array, as in example 1.
  651.  
  652.  
  653.  
  654.  
  655.                                                                        PPPPaaaaggggeeee 11110000
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662. SSSSCCCCFFFFFFFFTTTT3333DDDD((((3333SSSS))))                                                        SSSSCCCCFFFFFFFFTTTT3333DDDD((((3333SSSS))))
  663.  
  664.  
  665.  
  666.      Fortran:
  667.  
  668.       REAL    X(0:128, 0:128, 0:128)
  669.       COMPLEX Y(0:64,  0:128, 0:128)
  670.       REAL    TABLE ((128 + 256) + (2*128 + 256) + (2*128 + 256))
  671.       REAL    WORK(128 + 4*128)
  672.       INTEGER ISYS(0:1)
  673.       ISYS(0) = 1
  674.       CALL SCFFT3D(0, 128, 128, 128, 1.0, X, 129, 129,
  675.      &             Y, 65, 129, TABLE, WORK, ISYS)
  676.       CALL SCFFT3D(1, 128, 128, 128, 1.0, X, 129, 129,
  677.      &             Y, 65, 129, TABLE, WORK, ISYS)
  678.  
  679.  
  680.      C/C++:
  681.  
  682.           #include <scsl_fft.h>
  683.           float x[129][129][129];
  684.           scsl_complex y[129][129][65];
  685.           float table[(128 + 256) + (2*128 + 256) + (2*128 + 256)];
  686.           float work[128 + 4*128];
  687.           int isys[2];
  688.           isys[0] = 1;
  689.           scfft3d(0, 128, 128, 128, 1.0f, (float *) x, 129, 129,
  690.                   (scsl_complex *) y, 65, 129, table, work, isys);
  691.           scfft3d(1, 128, 128, 128, 1.0f, (float *) x, 129, 129,
  692.                   (scsl_complex *) y, 65, 129, table, work, isys);
  693.  
  694.  
  695.      C++ STL:
  696.  
  697.           #include <complex.h>
  698.           #include <scsl_fft.h>
  699.           float x[129][129][129];
  700.           complex<float> y[129][129][65];
  701.           float table[(128 + 256) + (2*128 + 256) + (2*128 + 256)];
  702.           float work[128 + 4*128];
  703.           int isys[2];
  704.           isys[0] = 1;
  705.           scfft3d(0, 128, 128, 128, 1.0f, (float *) x, 129, 129,
  706.                   (complex<float> *) y, 65, 129, table, work, isys);
  707.           scfft3d(1, 128, 128, 128, 1.0f, (float *) x, 129, 129,
  708.                   (complex<float> *) y, 65, 129, table, work, isys);
  709.  
  710.  
  711.      Example 3:  Take the inverse FFT of YYYY and store it back in XXXX.  Note that
  712.      the leading dimension of _X must be increased to 2*_l_d_y. The _s_c_a_l_e factor
  713.      1.0/(128.0*128.0*128.0) is used.  Assume that the TTTTAAAABBBBLLLLEEEE array is
  714.      initialized already.
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.                                                                        PPPPaaaaggggeeee 11111111
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728. SSSSCCCCFFFFFFFFTTTT3333DDDD((((3333SSSS))))                                                        SSSSCCCCFFFFFFFFTTTT3333DDDD((((3333SSSS))))
  729.  
  730.  
  731.  
  732.      Fortran:
  733.  
  734.            REAL X(0:129, 0:128, 0:128)
  735.            COMPLEX Y(0:64, 0:128, 0:128)
  736.            ...
  737.            CALL CSFFT3D(-1, 128, 128, 128, 1.0/128.0**3, Y, 65, 129,
  738.           &             X, 130, 129, TABLE, WORK, ISYS)
  739.  
  740.  
  741.      C/C++:
  742.  
  743.           float x[129][129][130];
  744.           scsl_complex y[129][129][65];
  745.           csfft3d(-1, 128, 128, 128, 1.0f/(128.0f*128.0f*128.0f),
  746.                  (scsl_complex *) y, 65, 129, (float *) x, 130, 129,
  747.                  table, work, isys);
  748.  
  749.  
  750.      C++ STL:
  751.  
  752.      float x[129][129][130];
  753.      complex<float> y[129][129][65];
  754.      csfft3d(-1, 128, 128, 128, 1.0f/(128.0f*128.0f*128.0f),
  755.             (complex<float> *) y, 65, 129, (float *) x, 130, 129,
  756.             table, work, isys);
  757.  
  758.  
  759.      Example 4:  Perform the same computation as in example 2, but equivalence
  760.      the input and output arrays to save storage space.  In this case, a row
  761.      must be added to _X, because it is equivalenced to a complex array.  Use
  762.      the 8-byte integer version of SCSL.
  763.  
  764.      Fortran:
  765.  
  766.       REAL    X(130, 129, 129)
  767.       COMPLEX Y(65, 129, 129)
  768.       EQUIVALENCE (X(1, 1, 1), Y(1, 1, 1))
  769.       REAL    TABLE ((128 + 256) + (2*128 + 256) + (2*128 + 256))
  770.       REAL    WORK(128 + 4*128)
  771.       INTEGER*8 ISYS(0:1)
  772.       ISYS(0) = 1_8
  773.       CALL SCFFT3D(0_8, 128_8, 128_8, 128_8, 1.0, X, 130_8, 129_8,
  774.      &             Y, 65_8, 129_8, TABLE, WORK, ISYS)
  775.       CALL SCFFT3D(1_8, 128_8, 128_8, 128_8, 1.0, X, 130_8, 129_8,
  776.      &             Y, 65_8, 129_8, TABLE, WORK, ISYS)
  777.  
  778.  
  779.      C/C++:
  780.  
  781.      #include <scsl_fft_i8.h>
  782.      float *x;
  783.      scsl_complex y[129][129][65];
  784.  
  785.  
  786.  
  787.                                                                        PPPPaaaaggggeeee 11112222
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794. SSSSCCCCFFFFFFFFTTTT3333DDDD((((3333SSSS))))                                                        SSSSCCCCFFFFFFFFTTTT3333DDDD((((3333SSSS))))
  795.  
  796.  
  797.  
  798.      float table[(128 + 256) + (2*128 + 256) + (2*128 + 256)];
  799.      float work[128 + 4*128];
  800.      long long isys[2];
  801.      isys[0] = 1LL;
  802.      x = (float *) &y[0][0][0];
  803.      scfft3d(0LL, 128LL, 128LL, 128LL, 1.0f, x, 130LL, 129LL,
  804.              (scsl_complex *) y, 65LL, 129LL, table, work, isys);
  805.      scfft3d(1LL, 128LL, 128LL, 128LL, 1.0f, x, 130LL, 129LL,
  806.              (scsl_complex *) y, 65LL, 129LL, table, work, isys);
  807.  
  808.  
  809.      C++ STL:
  810.  
  811.      #include <complex.h>
  812.      #include <scsl_fft_i8.h>
  813.      float *x;
  814.      complex<float> y[129][129][65];
  815.      float table[(128 + 256) + (2*128 + 256) + (2*128 + 256)];
  816.      float work[128 + 4*128];
  817.      long long isys[2];
  818.      isys[0] = 1LL;
  819.      x = (float *) &y[0][0][0];
  820.      scfft3d(0LL, 128LL, 128LL, 128LL, 1.0f, x, 130LL, 129LL,
  821.              (complex<float> *) y, 65LL, 129LL, table, work, isys);
  822.      scfft3d(1LL, 128LL, 128LL, 128LL, 1.0f, x, 130LL, 129LL,
  823.              (complex<float> *) y, 65LL, 129LL, table, work, isys);
  824.  
  825.  
  826.      Example 5:  Perform the same computation as in example 2, but assume that
  827.      the lower bound of each Fortran array is 1, rather than 0.  No change is
  828.      made in the subroutine calls.
  829.  
  830.      Fortran:
  831.  
  832.            REAL    X(129, 129, 129)
  833.            COMPLEX Y(65, 129, 129)
  834.            ...
  835.            CALL SCFFT3D(0, 128, 128, 128, 1.0, X, 129, 129,
  836.           &             Y, 65, 129, TABLE, WORK, ISYS)
  837.            CALL SCFFT3D(1, 128, 128, 128, 1.0, X, 129, 129,
  838.           &             Y, 65, 129, TABLE, WORK, ISYS)
  839.  
  840.  
  841. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  842.      IIIINNNNTTTTRRRROOOO____FFFFFFFFTTTT(3S), IIIINNNNTTTTRRRROOOO____SSSSCCCCSSSSLLLL(3S), CCCCCCCCFFFFFFFFTTTT(3S), CCCCCCCCFFFFFFFFTTTT2222DDDD(3S), CCCCCCCCFFFFFFFFTTTT3333DDDD(3S),
  843.      CCCCCCCCFFFFFFFFTTTTMMMM(3S), SSSSCCCCFFFFFFFFTTTT(3S), SSSSCCCCFFFFFFFFTTTT2222DDDD(3S), SSSSCCCCFFFFFFFFTTTTMMMM(3S)
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.                                                                        PPPPaaaaggggeeee 11113333
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.